package com.mallcai.bigdata.ladon.utils.excel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * described : 复杂表头
 * Created by DiLong on 2017-12-20 15:15.
 * Modify:
 */
public class ComplexHead implements Serializable {
    private String            name;     //列名
    private List<ComplexHead> children; //子列

    public ComplexHead(String name) {
        this.name = name;
        this.children = new ArrayList<>();
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public List<ComplexHead> getChildren() {
        return children;
    }

    public ComplexHead(String name, List<ComplexHead> children) {
        this.name = name;
        if (children != null) {
            this.children = children;
        } else {
            this.children = new ArrayList<>();
        }
    }

    public boolean haveChildren() {
        return (children != null && children.size() > 0);
    }
}


